package com.wctj.api.base.dto;

public class JwtUserDTO {
    private String username;
    private Long userId;
    private String realName;
    private String systemCode;
    private String userIp;
    private Integer userType;

    public Integer getUserType() {
        return this.isDefaultAdmin() ? 1 : this.userType == null ? 0 : this.userType;
    }


    public boolean isDefaultAdmin() {
        return "admin".equalsIgnoreCase(this.username);
    }


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    public String getUserIp() {
        return userIp;
    }

    public void setUserIp(String userIp) {
        this.userIp = userIp;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }
}